home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr47 / lzpip103.zip / ZALLOC.H < prev    next >
Text File  |  1994-02-26  |  2KB  |  63 lines

  1. /*
  2.  The following sorce code is derived from Info-Zip 'zip' 2.01
  3.  distribution copyrighted by Mark Adler, Richard B. Wales,
  4.  Jean-loup Gailly, Kai Uwe Rommel, Igor Mandrichenko and John Bush.
  5. */
  6. #ifdef __COMPILER_KCC__
  7. #  define TOPS20
  8. #  define BIG_MEM
  9. #endif
  10. #ifdef MACOS
  11. #  define DYN_ALLOC
  12. #endif
  13. /* Under MSDOS we may run out of memory when processing a large number
  14.    of files. Compile with MEDIUM_MEM to reduce the memory requirements
  15.    or with SMALL_MEM to use as little memory as possible. */
  16. #ifndef DYN_ALLOC
  17. #  ifdef BIG_MEM
  18. #     define DYN_ALLOC
  19. #  endif
  20. #  ifdef MMAP
  21. #     define DYN_ALLOC
  22. #  endif
  23. #endif
  24. #ifdef MSDOS
  25. #  ifndef __GO32__
  26. #    ifndef WIN32
  27. #      define DYN_ALLOC
  28. #      ifdef __TURBOC__
  29. #        include <alloc.h>
  30. /* Turbo C 2.0 does not accept static allocations of large arrays */
  31.          void far *zalloc(void far **, unsigned, unsigned);
  32. #        define zfree(p) farfree(p);
  33. #      else
  34. #        include <malloc.h>
  35. #        define zalloc(p,n,s) halloc((long)(n),(s));
  36. #        define zfree(p)      hfree((void huge *)(p));
  37. #      endif
  38. #    endif
  39. #  endif
  40. #endif
  41.  
  42. #ifndef zfree
  43. #  ifdef WIN32
  44. #    include <malloc.h>
  45. #  endif
  46. #  ifdef __WATCOMC__
  47. #    undef far
  48. #    undef near
  49. #  endif
  50. #  ifndef __IBMC__
  51. #    define far
  52. #    define near
  53. #    define huge
  54. #  endif
  55. #  define zalloc(p,n,s) calloc((long)(n),(s));
  56. #  define zfree(p)      free((void huge *)(p));
  57. #  ifndef MODERN
  58. #    ifndef TOPS20
  59.        char *calloc(); /* essential for 16 bit systems (AT&T 6300) */
  60. #    endif
  61. #  endif
  62. #endif
  63.